//
//  test_sql.h
//  TestMac
//
//  Created by 小星星吃KFC on 2021/8/5.
//

#import <Foundation/Foundation.h>
#import "AXSQLStatement.h"


static void test_sql(void){
    
    [AXSQLStatement createWithTable:@"Person3"
                              field:@{@"id1":AXSQLFieldTypeInt,
                                      @"id2":AXSQLFieldTypeInt,
                                      @"name1":AXSQLFieldTypeString,
                                      @"age1":AXSQLFieldTypeInt}];
    
    [AXSQLStatement createWithTable:@"Person4"
                              field:@{@"id1":AXSQLFieldTypeInt,
                                      @"id2":AXSQLFieldTypeInt,
                                      @"name1":AXSQLFieldTypeString,
                                      @"age1":AXSQLFieldTypeInt}
                                key:@"id2"];
    
    [AXSQLStatement insertNotExistsWithTable:@"Person"
                                      values:@{@"id1":@"1",@"id2":@"1",@"name1":@"tom",@"age1":@(20)}
                                      wheres:@{@"id1=":@"1",@"id2=":@"1"}];
    
    
    [AXSQLStatement  dropWithTable:@"Person3"];
    
    
    [AXSQLStatement deleteWithTable:@"Person3" values:@{@"id1":@"1",@"id2":@"1"}];
    
    [AXSQLStatement  updateWithTable:@"Person"
                              values:@{@"id1":@"1",@"id2":@"1",@"name1":@"tom",@"age1":@(20)}
                              wheres:@{@"id1":@"1",@"id2":@"1"}];
    
}
